package com.msb.apiDriver.remote;

import com.msb.internalcommon.dto.Car;
import com.msb.internalcommon.dto.DriverUser;
import com.msb.internalcommon.dto.ResponseResult;
import com.msb.internalcommon.reponese.DriverUserExistsResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther: jiudianliu
 * @Date: 2023/7/1 - 07 - 01 - 17:07
 * @Description: com.msb.apiDriver.remote
 * @version: 1.0
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @RequestMapping(method = RequestMethod.PUT , value = "/user")
    public ResponseResult updateUser(@RequestBody DriverUser driverUser);


    @RequestMapping(method = RequestMethod.GET , value = "/check-driver/{driverPhone}")
    public  ResponseResult<DriverUserExistsResponse> checkDriver(@PathVariable("driverPhone") String driverPhone);

    @RequestMapping(method = RequestMethod.GET , value = "/car")
    public ResponseResult<Car> getCarById(@RequestParam Long carId);

}
